package mylab.starters.generator.code;

import cn.hutool.extra.spring.SpringUtil;
import lombok.experimental.UtilityClass;


@UtilityClass
public class CodeGenerator {

    CodeTemplate template = SpringUtil.getBean(CodeTemplate.class);

    public void generateCode() {
        String projectPath = System.getProperty("os.name").toLowerCase().contains("windows") ? "%USERPROFILE%/generatedCode" : "~/generatedCode";
        generateCode("mylab", "com.xxx.app", "biz", projectPath);
    }

    public void generateCode(String author, String packageName, String moduleName, String projectPath) {
        template.generateCode(author, packageName, moduleName, projectPath);
    }


}
